<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>边框圆角</title>
    <link rel="stylesheet" href="../public.css">
    <style>
        .box {
            width: 300px;
            margin: 20px auto;
            padding: .8rem;
            background: #655;
            color: white;
        }

        .box div {
            background: tan;
            border-radius: .8em;
            padding: 1em;
        }

        .box1 {
            width: 300px;
            height: 70px;
            margin: 40px auto;
            background: tan;
            border-radius: .8em;
            padding: 1em;
            line-height: 70px;
            text-align: center;
        }

        .shadow {
            box-shadow: 0 0 0 .5em #655;
        }

        .outline {
            outline: .6em solid #655;
        }

        .sha {
            box-shadow: 0 0 0 .5em #655;
            outline: .6em solid #655;
        }
    </style>
</head>

<body>
    <div class="content">
        <h1>两个元素实现边框圆角</h1>
        <ul>
        </ul>
        <div class="box">
            <div>
                有时我们需要一个容器，只在内侧有圆角，而边框或描边的四个角在外
                部仍然保持直角的形状，
            </div>
        </div>
    </div>
    <div class="content">
        <h1>利用outline & box-shadow</h1>
        <ul>
            <li>描边(outline)不会跟着元素的圆角走，但是box-shadow会</li>
            <li>利用box-shadow填充描边和容器圆角之间的空隙，组合达成想要的效果</li>
        </ul>
        <div class="box1 shadow">
            box-shadow
        </div>
        <div class="box1 outline">
            outline
        </div>
        <div class="box1 sha">
            outline & box-shadow
        </div>
    </div>
</body>

</html>